<extend name="Layout/index" />
<block name="resource">
    <link rel="stylesheet" href="__PUBLIC__/page.css" />
</block>
<block name="breadcrumb-01">
    <li>
        <i class="icon-home home-icon"></i>
        <a href="<{:U('Index/index')}>">首页</a>
    </li>
    <li class="active">经验评论管理</li>
</block>
<block name="search">
<!-- <div class="nav-search" id="nav-search">
    <form class="form-search" action="<{:U('User/index')}>" method="get">
        <span class="input-icon" >
            <input type="text" placeholder="请输入用户名" class="nav-search-input" id="nav-search-input" autocomplete="off" name="name" />
            <i class="icon-search nav-search-icon"></i>
        </span>
    </form>
</div> -->
</block>
<block name="breadcrumb-02">
    <h1>
        经验评论管理
        <small>
            <i class="icon-double-angle-right"></i>
             评论信息
        </small>
    </h1><hr>
        <table class="table table-striped table-hover table-bordered" width="300">
            <tr>
                <th>
                    ID
                </th>
                <th>
                    评论者
                </th>
                <th>
                    评论内容
                </th>
                <th>
                    评论时间
                </th>
                <th>
                    作者
                </th>
                <th>
                    经验内容
                </th>
                <th>
                    操作
                </th>
            </tr>
            <volist name="comment" id="vo">
                <tr>
                    <td><{$vo.id}></td>
                    <td><{$vo.name}></td>
                    <td><{$vo.content}></td>
                    <td><{$vo.time}></td>
                    <td>
                        <volist name="experience" id="vl">
                            <if condition="$vo['eid'] eq $vl['id']">
                                <{$vl.uname}>
                            </if>
                        </volist>
                    </td>
                    <td>
                        <volist name="experience" id="vl">
                            <if condition="$vo['eid'] eq $vl['id']">
                                <{$vl.title}>
                            </if>
                        </volist>
                    </td>
                    <td><button class="btn btn-danger" type="submit" onclick="del(this,<{$vo.id}>)">删除</button></td>
                </tr>
                </volist>
        </table>
        <div  class="green-black"><{$page}></div>
</block>

<block name="jquery">
    <script>
        function del(obj,id){
          $(obj).parent().parent().remove();
          $.ajax({
              type:'post',
              url:"<{:U('News/del')}>",
              data:'id='+id+'',
              dataType:'json',
              success:function(){

              }
          });
        };
    </script>
</block>